//===========================================
// [] The PlutoEA Project []
// http://opensvn.csie.org/PlutoEA
// ------------------------------------------
// - Ÿ } -
// ------------------------------------------
//  0.9
//================================================================
// qoowꤺu ( ->  ->  -> 㭵ùJ -> ƶ -> 㭵ùJ -> )
//================================================================

airplane,243,74,4	script	#AirshipWarp-1	45,2,2,{
OnTouch:
	if($@airplanelocation == 1)warp "einbroch",90,275;
	if($@airplanelocation == 2)warp "yuno",85,265;
	if($@airplanelocation == 3)warp "lighthalzen",302,75;
	if($@airplanelocation == 4)warp "hugel",182,150;
	end;

OnHide:
	misceffect 16;
	end;
OnUnhide:
	misceffect 215;
	end;
}

airplane,243,29,4	script	#AirshipWarp-2	45,2,2,{
OnTouch:
	if($@airplanelocation == 1)warp "einbroch",90,275;
	if($@airplanelocation == 2)warp "yuno",85,265;
	if($@airplanelocation == 3)warp "lighthalzen",302,75;
	if($@airplanelocation == 4)warp "hugel",182,150;
	end;

OnHide:
	misceffect 16;
	end;
OnUnhide:
	misceffect 215;
	end;
}

airplane,1,1,0	script	EinYuno_Airship	-1,{
OnInit:
while(1)
{
	initnpctimer;
	setnpctimer 0;
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","Ÿn_FAU@ӥتO",1,0xBA55D3;
	end;
OnTimer15000:
	mapannounce "airplane","ثeŸ~",1,0xBA55D3;
	end;
OnTimer30000:
	mapannounce "airplane","@UŸNnbF",1,0xBA55D3;
	end;
OnTimer40000:
	set $@airplanelocation,4;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";	
	mapannounce "airplane","ڭ̤wgFFAUȫȦA|F",1,0xBA55D3;
	end;
OnTimer50000:
	mapannounce "airplane","ڭ̥ثeabA@UYNnXoo",1,0xBA55D3;
	end;
OnTimer60000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","Ÿn_FAU@ӥتO",1,0x00FF00;
	end;
OnTimer75000:
	mapannounce "airplane","ثeŸճ~",1,0x00FF00;
	end;
OnTimer90000:
	mapannounce "airplane","@UŸNnbդF",1,0x00FF00;
	end;
OnTimer100000:
	set $@airplanelocation,2;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","ڭ̤wgFդFAUȫȦA|F",1,0x00FF00;
	end;
OnTimer110000:
	mapannounce "airplane","ڭ̥ثeabդA@UYNnXoo",1,0x00FF00;
	end;
OnTimer120000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","Ÿn_FAU@ӥتO㭵ùJ",1,0xFF8600;
	end;
OnTimer135000:
	mapannounce "airplane","ثeŸ㭵ùJ~",1,0xFF8600;
	end;
OnTimer150000:
	mapannounce "airplane","@UŸNnb㭵ùJF",1,0xFF8600;
	end;
OnTimer160000:
	set $@airplanelocation,1;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","ڭ̤wgF㭵ùJFAUȫȦA|F",1,0xFF8600;
	end;
OnTimer170000:
	mapannounce "airplane","ڭ̥ثeab㭵ùJA@UYNnXoo",1,0xFF8600;
	end;
OnTimer180000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","Ÿn_FAU@ӥتOƶ",1,0x70DBDB;
	end;
OnTimer195000:
	mapannounce "airplane","ثeŸƶ~",1,0x70DBDB;
	end;
OnTimer210000:
	mapannounce "airplane","@UŸNnbƶF",1,0x70DBDB;
	end;
OnTimer220000:
	set $@airplanelocation,3;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","ڭ̤wgFƶFAUȫȦA|F",1,0x70DBDB;
	end;
OnTimer230000:
	mapannounce "airplane","ڭ̥ثeabƶA@UYNnXoo",1,0x70DBDB;
	end;

OnTimer240000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","Ÿn_FAU@ӥتO㭵ùJ",1,0x00FF00;
	end;
OnTimer255000:
	mapannounce "airplane","ثeŸ㭵ùJ~",1,0x00FF00;
	end;
OnTimer270000:
	mapannounce "airplane","@UŸNnb㭵ùJF",1,0x00FF00;
	end;
OnTimer280000:
	set $@airplanelocation,1;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","ڭ̤wgF㭵ùJFAUȫȦA|F",1,0x00FF00;
	end;
OnTimer290000:
	mapannounce "airplane","ڭ̥ثeab㭵ùJA@UYNnXoo",1,0x00FF00;
	end;
OnTimer300000:
	set $@airplanelocation,0;
	donpcevent "#AirshipWarp-1::OnHide";
	donpcevent "#AirshipWarp-2::OnHide";
	disablenpc "#AirshipWarp-1";
	disablenpc "#AirshipWarp-2";
	mapannounce "airplane","Ÿn_FAU@ӥتO",1,0xFF8600;
	end;
OnTimer315000:
	mapannounce "airplane","ثeŸճ~",1,0xFF8600;
	end;
OnTimer330000:
	mapannounce "airplane","@UŸNnbդF",1,0xFF8600;
	end;
OnTimer340000:
	set $@airplanelocation,2;
	enablenpc "#AirshipWarp-1";
	enablenpc "#AirshipWarp-2";
	donpcevent "#AirshipWarp-1::OnUnhide";
	donpcevent "#AirshipWarp-2::OnUnhide";
	mapannounce "airplane","ڭ̤wgFդFAUȫȦA|F",1,0xFF8600;
	end;
OnTimer350000:
	mapannounce "airplane","ڭ̥ثeabդA@UYNnXoo",1,0xFF8600;
	end;
OnTimer360000:
	stopnpctimer;
}
}

//============================================================ 
//= Some normal NPCS (airplane)
//============================================================ 

airplane,240,64,5	script	Xf#01::Exit2	857,{

end;

}

airplane,247,64,5	duplicate(Exit2)	Xf#02	857

airplane,240,39,1	duplicate(Exit2)	Xf#03	857

airplane,247,39,1	duplicate(Exit2)	Xf#04	857

airplane,100,69,2	script	խ#01::Airship Crew	852,{

	mes "[խ]";
	mes "pGAnbŸUӪ,ЧQΨWhӱ,P§AfŸ,";
	mes "AӴr֪@!";
	close;

}

airplane,250,58,3	script	Ÿ u@H::AirshipInfo	67,{

	mes "[Ÿ u@H]";
	mes "An, ڭ̭ŸHɷ|ɨү઺ѵUȫKSξAȦA, аݱzݭn?";
	next;
	switch (select("QέŸk:Ǫm:]I:")) {
	case 1:
		mes "[Ÿ u@H]";
		mes "pQfŸFتa, ťsqFتa, gѨⰼXfUYi";
		next;
		mes "[Ÿ u@H]";
		mes "U@UɿL|, ѩ󭸪ŸO@`檺, ҥHеU@ɦAU";
		close;
	case 2:
		mes "[Ÿ u@H]";
		mes "Ǧ󭸪Ÿ̫e, ̦ŸMrpbx, Hܦn, @wnӭ";
		close;
	case 3:
		mes "[Ÿ u@H]";
		mes "FקKȫȦbȦ~PL, ҥHbŸǳƤFpC, ȳ~ҹyɥiH𮧪Ŷ, Цh[Q";
		close;

	case 4:
		mes "[Ÿ u@H]";
		mes "Aȳ~wr";
		close;
	}
}

airplane,50,66,5	script	NO::AirshipApples	86,{
	mes "[NO]";
	mes "w{AڳoئcsAīGM^īGĪAȳ~";
	next;
	switch (select("ڭnʶRīG:ڭnīG^īG:")) {
	case 1:
		mes "[NO]";
		mes "бzJnʶRīGƶqAīGC15A@̦hR500";
		mes "AYnʶRɽпJ0";
		next;
		input @tempapple;
		if(!@tempapple) break;
		if(@tempapple > 0 && @tempapple < 501) {
			mes "[NO]";
			mes "znʶRīGƶqO ^FF0000" + @tempapple + "^000000B";
			mes "ҥHnIBO ^FF0000" + @tempapple * 15 + "Zeny^000000";
			mes "zTwnʶR?";
			next;
			if (select("O:R")==2) break;
			if(zeny < (@tempapple * 15)) {
				mes "[NO]";
				mes "~ ȤHAA!";
				close;
			}
			mes "[NO]";
			mes "±zApGzٻݭnīGܡAwzA";
			getitem 512,@tempapple;
			set zeny,zeny - (@tempapple * 15);
			close;
		}
		if(@tempapple < 0)close;
		mes "[NO]";
		mes "zJƶqWLWFAбzsJ";
		close;
	case 2:
		mes "[NO]";
		mes "īGĻݭn ^FF0000īG3MŲ~1^000000Aбzoǧƥ";
		mes "ڴNs@FAаݱzn^īGĶ?";
		next;
		if (select("O:n")==2) break;
		if(countitem(512) < 3 || !countitem(713)) {
			mes "[NO]";
			mes "zҾ֦ƦnOAڦAiDA@MaAݭnīG3MŲ~ 1ӡAбzoǧƥ浹ڴNs@FA`ƫAӧڧa";
			close;
		}
		mes "[NO]";
		mes "Thank you,";
		mes "please wait";
		mes "just a moment.";
		next;
		mes "*Grind grind*";
		mes "*Grind grind*";
		mes "*Clang...!*";
		next;
		mes "[NO]";
		mes "There you go~";
		mes "I hope you enjoy!";
		mes "Please feel free to";
		mes "stop by for your Apple";
		mes "and Apple Juice needs";
		mes "at anytime, adventurer~";
		delitem 512,3;
		delitem 713,1;
		getitem 531,1;
		close;
	case 3:
	}
	mes "[NO]";
	mes "wzUAӭAo~";
	close;
}

airplane,80,71,4	script	Ǽֶ	834,{
	mes "[Ǽֶ]";
	mes "ڬOFǹFл~Jȳ~, zLлϿc--̼w[ε_Ӫ, ~Oگu";
	close;
}

airplane,65,63,4	script	֤k#air	714,{
	mes "[֤k]";
	mes "oŸ櫰a? LڵFѥbѳSťF櫰s...";
	close;
}

airplane,72,34,6	script	ȧVq	702,{
	mes "[ȧVq]";
	mes "bŤݪD`}G, Y๳뿬ѪŸӦhnO";
	close;
}

airplane,32,61,4	script	 ::TypingContest	49,{
	callfunc "F_ClearGarbage"; //Clear outdated, unused variables
loopback:
	mes "[ ]";
	mes "AnܡAڬOD^FF0000rC^000000DH Aаݻݭn?";
	next;
	menu "D^FF0000rC^000000",s_Play,"ڭnť^FF0000rC^000000",s_Info,"ڭnݳ̰Ʀ]",s_Record,"",-;

	mes "[ ]";
	mes "|uo@ӤwAYQD^0000FFrC^000000ܡAwAHɨӧڳ!";
	close;

s_Play:
	mes "[ ]";
	mes "AnܬD^FF0000rC^000000ڡAЧAⴣܪ峹eb̧֪ɶATJaAn}lF";
	next;
	//below arrays are for simplified entering of new lines ;P

	//first lines array
	setarray $@textstringsa$[0],
	"^00FFFFthkelfkskeldmsiejdlsle^0000FFhfndkelsheidl",
	"^993366hfjdkeldjsieldjs^663366hfjdjeiskdlefvbd",
	"^00FFFFCoboman no chikara-yumei na",
	"^993366belief love luck grimace sweat rush",
	"^00FFFFcallipygian salacious lascivious",
	"^663366uNflAPPaBLe LoVaBLe SeCreTs AnD",
	"^00CCFFburrdingdingdilidingdingphoohudaamb",
	"^FF33CCbarapaphurarlandreamduranbatuhi^990066wooi",
	"^FF33CCLiGhTsPeEd RiGhT SPEed leFT TURn",
	"^00CCFFI'm the King of all Weirdos! Now",
	"^00CCFFBy the power of^000000",
	"^00CCFF...silence. quiet benevolence...";

	//second lines array
	setarray $@textstringsb$[0],"skemd",
	"",
	"chikara-dalookii na chikara da ze!",
	"folktale rodimus optimus bumblebee",
	"licentious prurient concupiscent",
	"BoWLiNg aGaINST tHe KarMA of YoUtH",
	"andoora^0000FFbambarambambamburanbamding",
	"kabamturubamdingding",
	"RiGhT BuRn OrIGInAL GaNgSteR SmACk",
	"you know of my true power. Obey~!",
	"p-po-poi-po-poi-poin-poing",
	"soul mate... wonder. enigma...";
	//for the few 3-liners... =X

	setarray $@textstringsc$[0],"",
	"",
	"COBO ON!",
	"",
	"",
	"",
	"",
	"",
	"",
	"",
	"GOD-POING. I NEVER LOSE!",
	"cloud.";

	//comparisation strings
	setarray $@compstring$[0],
	"thkelfkskeldmsiejdlslehfndkelsheidlskemd",
	"hfjdkeldjsieldjshfjdjeiskdlefvbd",
	"Coboman no chikara-yumei na chikara-dalookii na chikara da ze! COBO ON!",
	"belief love luck grimace sweat rush folktale rodimus optimus bumblebee",
	"callipygian salacious lascivious licentious prurient concupiscent",
	"uNflAPPaBLe LoVaBLe SeCreTs AnD BoWLiNg aGaINST tHe KarMA of YoUtH",
	"burrdindingdilidingdingphoohudaambandoorabambarambambamburanbamding",
	"barapaphurarlandreamduranbatuhiwooikabamturubamdingding",
	"LiGhTsPeEd RiGhT SPEed leFT TURn RiGhT BuRn OrIGInAL GaNgSteR SmACk",
	"I'm the King of all Weirdos! Now you know of my true power. Obey~!",
	"By the power of p-po-poi-po-poi-poin-poing GOD-POING. I NEVER LOSE!",
	"...silence. quiet benevolence... soul mate... wonder. enigma... cloud";

	//lengths
	setarray $@lengths[0],20,32,73,73,65,66,67,55,67,66,67,69;

	//	initnpctimer;
	// pick 2 distinct phrases and initialize related variables
	set @index,rand(1,getarraysize($@textstringsa$))-1;
	set @string1a$,$@textstringsa$[@index];
	set @string1b$,$@textstringsb$[@index];
	set @string1c$,$@textstringsc$[@index];
	set @typingstring1$,$@compstring$[@index];

	set @index2,rand(1,getarraysize($@textstringsa$))-1;
	while (@index2 == @index) {
		set @index2,rand(1,getarraysize($@textstringsa$))-1;
	}
	set @string2a$,$@textstringsa$[@index2];
	set @string2b$,$@textstringsb$[@index2];
	set @string2c$,$@textstringsc$[@index2];
	set @typingstring2$,$@compstring$[@index2];

	set @typingkeys,$@lengths[@index]+$@lengths[@index2];
	set @start,gettime(3)*60*60+gettime(2)*60+gettime(1);

	mes "[Nils]";
	mes @string1a$;
	if(@string1b$ != "")mes @string1b$;
	if(@string1c$ != "")mes @string1c$;
	input @comparisonvar$[1];
	next;
	mes "^000000[Nils]";
	mes @string2a$;
	if(@string2b$ != "")mes @string2b$;
	if(@string2c$ != "")mes @string2c$;
	input @comparisonvar$[2];
	if(@comparisonvar$[1] == @typingstring1$ && @comparisonvar$[2] == @typingstring2$)set @typingcorrect,1;
	next;
	if(!@typingcorrect)goto s_Fail;
	set @time,(gettime(3)*60*60+gettime(2)*60+gettime(1))-@start; //seconds taken
	set @mypoints,(@typingkeys * 100) / @time;
	mes "[Nils]";
	mes "Your typing time";
	mes "was ^FF0000" + @time + " seconds^000000";
	mes "and your score is";
	mes "^0000FF" + @mypoints + "^000000 points";
	next;
	if(@mypoints <= $TypingRecord)goto loopback;
	mes "[Nils]";
	mes "Congratulations!";
	mes "It's a new record.";
	mes "I'll put you on the high-";
	mes "score list immediately.";
	set $TypingRecord,@mypoints;
	set $TypingRecord$,strcharinfo(0);
	close;

s_Fail:
	mes "^000000[Nils]";
	mes "I'm sorry you didn't type";
	mes "all characters correctly.";
	mes "But remember, practice makes";
	mes "perfect!";
	close;

s_Info:
	mes "[ ]";
	mes "^0000FFrC^000000Oڴܪ峹ATStLJCAڭ̷|ֳ̧tamWMɶUӡAYۤvtצHߪHAwӬDԳ!";
	close;

s_Record:
	mes "[ ]";
	mes "ثḛO";
	mes "^0000FF" + $TypingRecord$ + "^000000/pjҥߤU";
	mes "^0000FF" + $TypingRecord + "^000000rO̧֪";
	close;

}

airplane_01,221,158,6	script	Pilot#air-0::Pilot	852,{
	set @pilot, rand(1,4);
	if (@pilot == 1) {
		mes "[]";
		mes "ثeuOOFg131סA_n37סA";
		mes "@`!";
		close;
	} else if(@aa == 2) {
		mes "[]";
		mes "ѬOhѮA";
		mes "oؤѮn{ܧx..";
		close;
	} else if(@aa == 3) {
		mes "[]";
		mes "ʮܩ}aA";
		mes "CǪѡA";
		mes "ѤSn ..";
		mes "..";
		next;
		mes "[^FF0000p^000000]";
		mes "^FF0000ާA!! OuUA֥hu@!";
		mes "u@!^000000";
		next;
		mes "[]";
		mes "O~ O~ DF";
		close;
	}
		mes "[]";
		mes "I...oAOܫӰաAuOӼ...";
		mes "Ǹ̤]|~Hi";
		mes "u鷺Ǥu@?";
		next;
		mes "[]";
		mes ".......";
		next;
		//emotion 23;
		mes "[]";
		mes "c!? AOְ?!";
		close;
}

//============================================================ 
//= ڽu ( -> ̴|oq -> Ի -> )
//============================================================ 

airplane_01,243,74,4	script	#AirshipWarp-3	45,2,2,{
OnTouch:
	if($@airplanelocation2 == 1)warp "izlude",202,56;
	if($@airplanelocation2 == 2)warp "yuno",20,265;
	if($@airplanelocation2 == 3)warp "ra_fild12",292,204;
	end;

OnHide:
	misceffect 16;
	end;
OnUnhide:
	misceffect 215;
	end;
}

airplane_01,243,29,4	script	#AirshipWarp-4	45,2,2,{
OnTouch:
	if($@airplanelocation2 == 1)warp "izlude",202,56;
	if($@airplanelocation2 == 2)warp "yuno",20,265;
	if($@airplanelocation2 == 3)warp "ra_fild12",292,204;
	end;

OnHide:
	misceffect 16;
	end;
OnUnhide:
	misceffect 215;
	end;
}

airplane_01,1,1,0	script	YunoIzl_Airship	-1,{
OnInit:
while(1)
{
	disablenpc "Quest_Izl";
	initnpctimer;
	setnpctimer 0;
	set $@airplanelocation2,0;
	donpcevent "#AirshipWarp-3::OnHide";
	donpcevent "#AirshipWarp-4::OnHide";
	disablenpc "#AirshipWarp-3";
	disablenpc "#AirshipWarp-4";
	mapannounce "airplane_01","Ÿn_FAU@ӥتaO̴|oq",1,0x00FF00;
	end;
OnTimer15000:
	set $@mobinv, $@mobinv+1;
	set $@mobrand, rand(1,3);
	if($@mobinv >= 9 && $@mobrand == 3) {
		stopnpctimer;
		enablenpc "Quest_Izl";
		donpcevent "Quest_Izl::OnInvasion";
	}
	mapannounce "airplane_01","ثeŸ̴|oq~",1,0x00FF00;
	end;
OnTimer30000:
	mapannounce "airplane_01","@UŸNnb̴|oqF",1,0x00FF00;
	end;
OnTimer45000:
	set $@airplanelocation2,1;
	enablenpc "#AirshipWarp-3";
	enablenpc "#AirshipWarp-4";
	donpcevent "#AirshipWarp-3::OnUnhide";
	donpcevent "#AirshipWarp-4::OnUnhide";	
	mapannounce "airplane_01","ڭ̤wgF̴|oqAUȫȦA|F",1,0x00FF00;
	end;
OnTimer55000:
	mapannounce "airplane_01","ڭ̥ثeab̴|oqA@UYNnXoo",1,0x00FF00;
	end;
OnTimer65000:
	set $@airplanelocation2,0;
	donpcevent "#AirshipWarp-3::OnHide";
	donpcevent "#AirshipWarp-4::OnHide";
	disablenpc "#AirshipWarp-3";
	disablenpc "#AirshipWarp-4";
	mapannounce "airplane_01","Ÿn_FAU@ӥتaO",1,0x70DBDB;
	end;
OnTimer80000:
	mapannounce "airplane_01","ثeŸճ~",1,0x70DBDB;
	end;
OnTimer95000:
	mapannounce "airplane_01","@UŸNnbդF",1,0x70DBDB;
	end;
OnTimer110000:
	set $@airplanelocation2,2;
	enablenpc "#AirshipWarp-3";
	enablenpc "#AirshipWarp-4";
	donpcevent "#AirshipWarp-3::OnUnhide";
	donpcevent "#AirshipWarp-4::OnUnhide";
	mapannounce "airplane_01","ڭ̤wgFաAUȫȦA|F",1,0x70DBDB;
	end;
OnTimer120000:
	mapannounce "airplane_01","ڭ̥ثeabդA@UYNnXoo",1,0x70DBDB;
	end;
OnTimer130000:
	set $@airplanelocation2,0;
	donpcevent "#AirshipWarp-3::OnHide";
	donpcevent "#AirshipWarp-4::OnHide";
	disablenpc "#AirshipWarp-3";
	disablenpc "#AirshipWarp-4";
	mapannounce "airplane_01","Ÿn_FAU@ӥتOԻ",1,0xFF8600;
	end;
OnTimer145000:
	mapannounce "airplane_01","ثeŸԻ",1,0xFF8600;
	end;
OnTimer160000:
	mapannounce "airplane_01","@UŸNnbԻF",1,0xFF8600;
	end;
OnTimer175000:
	set $@airplanelocation2,3;
	enablenpc "#AirshipWarp-3";
	enablenpc "#AirshipWarp-4";
	donpcevent "#AirshipWarp-3::OnUnhide";
	donpcevent "#AirshipWarp-4::OnUnhide";
	mapannounce "airplane_01","ڭ̤wgԻFAUȫȦA|F",1,0xFF8600;
	end;
OnTimer185000:
	mapannounce "airplane_01","ڭ̥ثeabԻA@UYNXoo",1,0xFF8600;
	end;
OnTimer195000:
 	stopnpctimer;
}
OnReturn:
	killmonsterall "airplane_01";
	set $@mobinv, 0;
	mapannounce "airplane_01","s : ]̦nwghF, ^_쥿`",1,0x00FF00;
	startnpctimer;
	end;
}

//============================================================ 
//= Some normal NPCS (airplane_01)
//============================================================ 

airplane_01,240,64,5	duplicate(Exit2)	Xf#05	857

airplane_01,247,64,5	duplicate(Exit2)	Xf#06	857

airplane_01,240,39,1	duplicate(Exit2)	Xf#07	857

airplane_01,247,39,1	duplicate(Exit2)	Xf#08	857

airplane_01,100,69,2	duplicate(Airship Crew)	խ#02	852

airplane_01,250,59,3	duplicate(AirshipInfo)	Ÿ u@H#info	67

airplane_01,50,66,4	duplicate(AirshipApples)	NO	86

airplane_01,32,61,4	duplicate(TypingContest)	 	49

airplane_01,221,158,6	duplicate(Pilot)	Pilot#air-1	852


airplane_01,83,61,2	script	 k#10	72,{

	mes "[ k]";
	mes "zzzz.......";
	mes "ڱq~]۪, Mڤڤڪ, ~ڤF.. _";
	close;
OnTouch:
	Emotion 28, "Dianne";
	end;
}

airplane_01,69,63,2	script	QڲԤh#06	55,{

	mes "[QڲԤh]";
	mes "ŸѪ\٬OXڪf, ⭻, ӱaڪMμpvӤ~...";
	close;

}

airplane_01,33,68,4	script	JԲ	74,{
	mes "[JԲ]";
	mes "AnܡAڪWrsJԲAz@ݦb";
	mes "ŸPLaAznnڻP";
	mes "@YlC?";
	next;
	callfunc "applegamble","JԲ";
	end;
}

airplane_01,71,31,6	script	Ch	106,{
	mes "[Ch]";
	mes "Finally, after five";
	mes "years of waiting...";
	mes "I can have my revenge!";
	next;
	mes "[Ch]";
	mes "I just...";
	mes "Have to make sure that";
	mes "I don't keep missing my";
	mes "stop. But soon, very soon,";
	mes "vengeance will be mine!";
	close;
}

//============================================================ 
//= ̴|oq  ¾
//============================================================

izlude,206,55,3	script	 ¾#izl	90,{
	mes "[ ¾]";
	mes "znAڭ̯HɴѵUȫKS";
	mes "AȦAȡA|ɨү઺Aаݱz";
	mes "n?";
	next;
	switch(select("ڷQnf/ԻŸ","")) {
		case 1:
			mes "[ ¾]";
			mes "QέŸOά1200ApGz";
			mes "ŸKOf骺ܡANKOiJ";
			mes "AаݱzniJ?";
			next;
			switch(select("O","n")) {
				case 1:
					if(countitem(7311) > 0) {
						delitem 7311,1;
						warp "airplane_01",244,58;
						close;
					}
					if(Zeny < 1200) {
						mes "[ ¾]";
						mes "znO1200~iJAznC";
						close;
					}
						set Zeny, Zeny - 1200;
						warp "airplane_01",244,58;
						close;
				case 2:
					mes "[ ¾]";
					mes "бzUAQΧaA¥{";
					close;
			}
		case 2:
			mes "[ ¾]";
			mes "бzUAQΧaA¥{";
			close;
	}
}

//============================================================ 
//=  nB
//============================================================

hugel,178,142,0	script	hugelwarp	45,1,1,{
	mes "QέŸOάO1200ApGz";
	mes "ŸKOf骺ܡANKOiJ";
	mes "аݱzn弧?";
	next;
	if(select("O","n")==2) {
	mes "wzUAӡC¥{";
	close;
	}
	if(countitem(7311))
	delitem 7311,1;
	else if(Zeny<1200) {
	mes "znO1200~iJA";
	mes "z";
	close;
	}
	else
	set Zeny,Zeny-1200;
	warp "airplane",244,58;
	end;
}

//============================================================ 
//= Ի nB
//============================================================

ra_fild12,295,208,0	script	rachelwarp	45,1,1,{
	mes "QέŸOάO1200ApGz";
	mes "ŸKOf骺ܡANKOiJ";
	mes "Aаݱznf?";
	next;
	if(select("O","n")==2) {
	mes "wzUAӡC¥{";
	close;
	}
	if(countitem(7311))
	delitem 7311,1;
	else if(Zeny<1200) {
	mes "znO1200~iJA";
	mes "z";
	close;
	}
	else
	set Zeny,Zeny-1200;
	warp "airplane_01",245,60;
	end;
}

//============================================================ 
//= վAnqDNPC
//============================================================

y_airport,145,63,5	script	 ¾#Ein	91,{
	mes "[ ¾]";
	mes "аݧAnϥέqoowŸ";
	mes "?";
	next;
	switch(select("O","n")) {
		case 1:
			warp "yuno",59,244;
			end;
		case 2:
			mes "[ ¾]";
			mes "zѦ@Ӵr֪Ȧ";
			close;
	}
}

y_airport,140,63,5	script	 ¾#Izl	91,{

	mes "[ ¾]";
	mes "аݧAnϥέ/̴|oq/Ի";
	mes "Ÿ?";
	next;
	switch(select("O","n")) {
		case 1:
			warp "yuno",47,244;
			end;
		case 2:
			mes "[ ¾]";
			mes "zѦ@Ӵr֪Ȧ";
			close;
	}

}

yuno,14,262,5	script	Ÿ ¾#yuno01::Ÿ ¾	91,{
	mes "[Ÿ ¾]";
	mes "An,";
	mes "ڭ̭ŸHɷ|ɨү઺ѵU";
	mes "KSξAȦA,";
	mes "QnfŸЧQγoiJ,";
	mes "Qn}ЧQζUhNiHF";
	close;
}

yuno,87,263,3	duplicate(Ÿ ¾)	Ÿ ¾#yuno02	91

//============================================================ 
//= Apple Gambling Function
//============================================================

function	script	applegamble	{
	switch(select("ڭn@Yl:ڷQAYlCWh:")){
	case 3:
		mes "["+getarg(0)+"]";
		mes "pGzQCHɨӧڧaA";
		mes "bo̵ob]ZL᪺AAo";
		close;
	case 2:
		mes "["+getarg(0)+"]";
		mes "{bڨYlCWhA";
		mes "²A}lCɡAiHU`̦h5";
		mes "0īGAMpGSīGN";
		mes "[CF";
		next;
		mes "["+getarg(0)+"]";
		mes "īGU`A妸UY⦸lAYX";
		mes "ӪXpIƤj@ӡAMpG";
		mes "@wsNjnAҥHU";
		mes "A@]ĤT^Yl|";
		next;
		mes "["+getarg(0)+"]";
		mes "nnAY@lOӤHۥѰڡAL";
		mes "@AY@lAIƭYWL12I";
		mes "AѶWL@謰a";
		next;
		mes "["+getarg(0)+"]";
		mes "AYĤTlɡAѱzYAp";
		mes "LYXӪIƶWL12IAYϧڤAY";
		mes "A]ڥD";
		next;
		mes "["+getarg(0)+"]";
		mes "bCӪ@AiH֦";
		mes "@ҤU`īGƶqAڳo˻wg";
		mes "ܲMFa";
		close;
	case 1:
		break;
	}
	mes "["+getarg(0)+"]";
	mes "YQnYlCANݭnīGA";
	mes "ݱznUh֭īG`O?";
	mes "̦hi@U50AQnCпJ0";
	next;
L_Input:
	input @amount;
	if(@amount == 0) {
		mes "["+getarg(0)+"]";
		mes "zܥDNoAULɦAӪaAA";
		close;
	}
	if(@amount > 50) {
		mes "["+getarg(0)+"]";
		mes "̤j50";
		mes "AS˿a";
		next;
		goto L_Input;
	}
	mes "["+getarg(0)+"]";
	mes "zҿJ`ƶqO ^FF0000" +@amount+ "^000000N";
	mes "??";
	next;
	if(select("O:O")==2){
		mes "["+getarg(0)+"]";
		mes "бzsJ";
		next;
		goto L_Input;
	}
	if(countitem(512)<@amount){
		//more apples then in inventory
		//-Improvised-
		mes "["+getarg(0)+"]";
		mes "īG !";
		mes "X?";
		close;
	}
	delitem 512,@amount;
	mes "["+getarg(0)+"]";
	mes "na,ڭ̴N}lCo,ѧڨӥY";
	mes "l";
	next;
	mes "- SS...BNBN...u -";
	set @table1,rand(1,6);
	set @table2,rand(1,6);
	set @tablesub,@table1+@table2;
	next;
	mes "YXӪlIƬO ^0000FF"+@table1+"^000000 M ^0000FF"+@table2+"^000000B";
	mes "XpO ^0000FF"+@tablesub+"^000000 I";
	mes "o^FF0000" +strcharinfo(0)+ "^000000/pjYlo";
	next;
	menu "Lucky Ball Go!",-;

	mes "SS...BNBN...u";
	set @player1,rand(1,6);
	set @player2,rand(1,6);
	set @playersub,@player1+@player2;
	next;
	mes "["+getarg(0)+"]";
	mes "^FF0000"+strcharinfo(0)+"^000000/pjYXӪlI";
	mes "^FF0000"+@player1+"^000000M^FF0000"+@player2+"^000000I";
	mes "XpO^FF0000"+@playersub+"^000000I!";
	next;
	mes "["+getarg(0)+"]";
	mes "ڪO^0000FF"+@tablesub+"^000000I";
	mes "^FF0000" +strcharinfo(0)+ "^000000O^FF0000"+@playersub+"^000000I";
	if(@playersub == @tablesub) {
		mes "ۦP?";
		mes "AӤ@?";
	} else if(@playersub > @tablesub) {
		mes "^FF0000"+getarg(0)+"^000000";
		mes "A!";
		mes "AӤ@?";
	} else if(@tablesub > @playersub) {
		mes "ڻ!";
		mes "AӤ@?";
	}
	next;
	if(select("n:F")==2){
		mes "["+getarg(0)+"]";
		mes "Not gonna roll, huh?";
		if(@tablesub == @playersub) {
			mes "z]Q_ۭIYl";
			mes "{bpڤ]@II";
			mes "ڭ̴N@aڭ̤UAӽ@a";
			next;
			goto L_Table3;
		} else if(@tablesub < @playersub) {
			next;
			mes "["+getarg(0)+"]";
			mes "Alright, I see that you";
			mes "don't want to risk rolling";
			mes "higher than 12 and busting.";
			mes "I'll go ahead and roll then.";
			next;
			goto L_Table3;
		} else if(@tablesub > @playersub) {
		//you have a lower sub total then table, and do not roll 3th -Improvised-
			mes "["+getarg(0)+"]";
			mes "Not gonna roll, huh?";
			mes "Well, then I'm not";
			mes "gonna roll either.";
			next;
			mes "["+getarg(0)+"]";
			mes "That means that I";
			mes "have a total of ^0000FF"+@tablesub+"^000000";
			mes "wich beats your ^FF0000"+@playersub+"^000000.";
			mes "I'm sorry, but you lose";
			mes "this game, "+strcharinfo(0)+". Better";
			mes "luck next time.";
		}
		close;
	}
	mes "PP.....NBB..NBBPP..!";
	set @player3,rand(1,6);
	set @playersub,@playersub+@player3;
	if(@playersub > 12) {
	//player bust --Improvised--
		next;
		mes "["+getarg(0)+"]";
		mes "^FF0000"+strcharinfo(0)+"^000000/pjYXӪlIƬO";
		mes "^FF0000"+@player3+"^000000I";
		mes "XpO^FF0000"+@playersub+"^000000I";
		mes "`pWVF 12 ";
		mes "ѤF!";
		mes "ᮬa!";
		close;
	}
	next;
	mes "["+getarg(0)+"]";
	mes "Oh hey! You rolled";
	if(@playersub >= @tablesub) {
		mes "a ^FF0000"+@player3+"^000000, giving you a total";
		mes "of ^FF0000"+@playersub+"^000000. Now, if I don't";
		mes "roll, I'll lose for sure!";
		mes "I'm gonna go for it...";
		next;
		goto L_Table3;
	} else if(@playersub < @tablesub) {
		//player's sub together with 3th die is still too low
		//--Improvised--
		mes "ڪun!";
		mes "AѤF!";
		close;
	}
L_Table3:
	mes "^0000FF*Rolling and rumbling*";
	set @table3,rand(1,6);
	set @tablesub,@tablesub+@table3;
	next;
	if(@tablesub > 12) {
		mes "["+getarg(0)+"]";
		mes "Eh? I rolled a ^0000FF"+@table3+"^000000, making";
		mes "my total ^0000FF"+@tablesub+"^000000. I hate to say";
		mes "it, but I gambled and lost.";
		mes "Take your winnings before";
		mes "I cry, "+strcharinfo(0)+"~!";
		close2;
		getitem 512,@amount*2;
		end;
	}
	mes "["+getarg(0)+"]";
	if(@tablesub < @playersub) {
		mes "I rolled a "+@table3+", which";
		mes "gives me a total of ^0000FF"+@tablesub+"^000000.";
		mes "But... It's still not enough";
		mes "to beat your ^FF0000"+@playersub+"^000000. It looks";
		mes "like I can't compete with";
		mes "you, "+strcharinfo(0)+"...";
		close2;
		getitem 512,@amount*2;
		end;
	} else if(@tablesub > @playersub) {
	mes "I rolled a ^0000FF"+@table3+"^000000, giving";
	mes "me a total of ^0000FF"+@tablesub+"^000000 which";
	mes "beats your total of ^FF0000"+@playersub+"^000000.";
	mes "Sorry, but you lose this";
	mes "game, "+strcharinfo(0)+". Them's";
	mes "the breaks, I suppose...";
	close;
	} else if(@tablesub == @playersub) {
		//Result = tie, --Improvised--
		mes "I rolled a ^0000FF"+@table3+"^000000, giving";
		mes "me a total of ^0000FF"+@tablesub+"^000000, which";
		mes "is the same as your total.";
		mes "Well, this game didn't have a";
		mes "winner or loser, "+strcharinfo(0)+".";
		close2;
		getitem 512,@amount;
		end;
	}
}
